using System;
using System.Collections.Generic;
using System.Text;
using Needle.Utils;
using Needle.Core.Resolver;
using Needle.Core;
using Needle.Framework;
using Needle.Core.Injection;
using Needle.Core.Activation;
using Needle.Core.Lifetime;
using System.Diagnostics;
using System.Reflection;
using System.IO;

namespace Needle {
    class HtmlOutput {
        /// <summary>
        /// Runs the tests in this assembly
        /// </summary>
        static void Main(string[] args) {
            FileInfo results = new FileInfo("TestResult.html");
            if (results.Exists) {
                results.Delete();
            }
            Console.WriteLine("Running tests, please  wait...");
            Console.SetOut(new StreamWriter(results.OpenWrite(), Encoding.UTF8));
            NUnit.ConsoleRunner.Runner.Main(new string[] { Assembly.GetExecutingAssembly().Location, "/transform:AlternativeNUnitDetails.xsl", "/nologo", "/noshadow", "/nodots" });
            Process.Start(results.FullName);
        }
    }
    class ConsoleOutput {
        /// <summary>
        /// Runs the tests in this assembly
        /// </summary>
        static void Main(string[] args) {
            NUnit.ConsoleRunner.Runner.Main(new string[] { Assembly.GetExecutingAssembly().Location, "/noshadow", "/wait", "/exclude=Performance" });
        }
    }
}
